-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed redundant Str.htmlDecode #20443
Removed redundant Str.htmlDecode #20443
Conversation
@s77rt Only instance of
|
Let's also update expensify-common (hold for Expensify/expensify-common#543) |
Str.htmlDecode(moneyRequestAction.originalMessage.comment), | ||
moneyRequestAction.originalMessage.comment, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure this is a plain text?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where ever I look, originalMessage.comment
is not present. There is only html
field inside originalMessage
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the console log for originalMessage.comment
? Can you check where we set it, and do we set html or text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment
field simply didn't exist here when I logged. I couldn't find place where comment is set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I think IOU messages are always in plain text. Looking at this I found another bug in getIOUReportActionMessage
. The html version here
Line 1298 in 81b631b
html: iouMessage, |
html: _.escape(iouMessage),
text: iouMessage,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alitoshmatov Can you apply this change as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
The input in that case is html right? |
Yes, I tested by logging it in console and it is escaped special charecters and comment above this code also supports it App/src/pages/home/report/ReportActionItemMessageEdit.js Lines 99 to 100 in b8d4576
|
The comment may be outdated, a lot has changed regarding decoding. Can you please post the logs for this one (and how can this be reproduced) |
Expensify/expensify-common#543 has been merged. Please update |
Got it thanks. Let me know when this is ready for review & tests |
…move-htmlDecode
@stitesExpensify @s77rt One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@s77rt Ready for review |
Reviewer Checklist
Screenshots/VideosWebweb.mp4Mobile Web - Chromemweb-chrome.mp4Mobile Web - Safarimweb-safari.mp4Desktopdesktop.mp4iOSios.mp4Androidandroid.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/stitesExpensify in version: 1.3.28-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀
|
Regression of #19237 was spotted in #19789 .
To fix this we are removing
Str.htmlDecode
from places where it was used on plain texts.Details
Fixed Issues
$ #19789
PROPOSAL: N/A
Tests

and sendOffline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
19789-web.mov
Mobile Web - Chrome
https://github.com/Expensify/App/assets/59907218/a2248e55-72ea-4674-a3b4-54467f78cc52Mobile Web - Safari
19789-safari.mp4
Desktop
19789-desktop.mov
iOS
19789-ios.mp4
Android
19789.mp4